@import "common.module.less";

.autoAddTestcasesHelp {
  white-space: pre-wrap;
}

.subtaskTitleTestcasesCount {
  margin-left: auto;
  opacity: 0.5;
  font-size: 0.9em;
}

.subtasksEditor {
  margin: 14px 0;
}

// Add "#root" to force override Semantic UI's styles
:global(#root) {
  .itemSubtaskTimeLimit, .itemSubtaskMemoryLimit {
    width: 95px;
    padding: 13px 13px !important;

    input {
      text-align: center !important;
      padding-left: 19px !important;
    }

    :global(i.icon) {
      opacity: 0.35;
    }

    &:focus-within {
      & + .itemLabel, :global(i.icon) {
        opacity: 1;
      }
    }

    + .itemLabel::before {
      display: none;
    }
  }

  .itemTestcaseUserOutputFilename {
    width: 200px;
    padding: 13px 13px !important;

    :global(i.icon) {
      opacity: 0.35;
    }

    &:focus-within {
      & + .itemLabel, :global(i.icon) {
        opacity: 1;
      }
    }
  }

  .itemSubtaskScore {
    width: 70px;
    padding: 13px 14px 13px 8px !important;

    :global(i.icon) {
      opacity: 0.35;
    }

    &:focus-within {
      :global(i.icon) {
        opacity: 1;
      }
    }

    input {
      text-align: center !important;
      padding-right: 14px !important;
    }
  }

  .itemTestcaseTimeLimit, .itemTestcaseMemoryLimit {
    width: 120px;

    input {
      text-align: center !important;
    }

    :global(i.icon) {
      opacity: 0.35;
    }

    &:focus-within {
      & + .itemLabel, :global(i.icon) {
        opacity: 1;
      }
    }

    + .itemLabel {
      width: 35px;

      &::before {
        display: none;
      }
    }
  }

  .itemTestcaseScore {
    width: 70px;
    padding: 13px 14px 13px 8px !important;

    > :global(.ui.disabled.input) {
      opacity: 1;
    }

    input {
      text-align: center !important;
      padding-right: 14px !important;
    }

    &:focus-within {
      :global(i.icon) {
        opacity: 1;
      }
    }
  }
}

.outputFileNotNeeded {
  flex-grow: 1 !important;
  color: rgb(191, 191, 191, 0.87) !important;

  &::before {
    display: none !important;
  }
}

.itemLabel {
  padding-left: 0 !important;
  padding-right: 13px !important;
  margin-left: -10px;
  font-weight: bolder !important;
  justify-content: center;
  opacity: 0.5;
}

.itemScoringTypeDropdown {
  flex-grow: 1 !important;

  &::before {
    display: none;
  }

  :global(.dropdown.icon) {
    margin-left: auto !important;
  }
}

.menuTestcaseFirstLine {
  border-bottom: none !important;
}

.menuTestcase {
  border-left: none !important;
  position: relative;

  &::before {
    content: "";
    width: .2em;
    height: 100%;
    background-color: #d4d4d5;
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 1;
  }

  &.color_0::before { background-color: @color_0 !important; }
  &.color_1::before { background-color: @color_1 !important; }
  &.color_2::before { background-color: @color_2 !important; }
  &.color_3::before { background-color: @color_3 !important; }
  &.color_4::before { background-color: @color_4 !important; }
  &.color_5::before { background-color: @color_5 !important; }
  &.color_6::before { background-color: @color_6 !important; }
  &.color_7::before { background-color: @color_7 !important; }
  &.color_8::before { background-color: @color_8 !important; }
  &.color_9::before { background-color: @color_9 !important; }
  &.color_10::before { background-color: @color_10 !important; }
}

.itemTestcaseTitle {
  width: 70px;
  justify-content: center;
  font-weight: bolder !important;
}

.itemDependencies {
  :global(.ui.label) {
    border-radius: 0;
    background-color: #f7f7f7 !important;
    color: rgba(0, 0, 0, 0.85) !important;
    margin: 2px 0 2px 4px !important;
  }
}
